import Http from '~/utils/fetch'

/**
 * 根据标签code获取标签名字
 * @param code 标签code
 * @returns
 */
export const getLabelNameByCode = async (code: string): Promise<string> => {
  return await Http.get('api-app/tag/getByCode', { code: code })
}
interface ResOptions<T> {
  code: string
  msg: string
  data?: T
}
interface resObject {
  name: string
  age: string
}
export const getTableList = async (
  params: any
): Promise<ResOptions<resObject[]>> => {
  return await new Promise((resolve, reject) => {
    resolve({
      code: '200',
      msg: 'succ',
      data: [
        {
          name: 'zhagnsan',
          age: '12',
        },
      ],
    })
  })
}
